verificationCode = function () {
    var pid = $('#pid').val();
    var reservationsId = $('#reservationsId').val();
    var code = $('#code').val();
    var verificationCode= $('#verificationCode').val();
    if(verificationCode==null || verificationCode==""){
        alert("请输入验证码");
        return;
    }
    $.ajax({
        url: Feng.ctxPath + "/integralMallWeixin/verificationCode",
        type: "post",
        data: {
            "pid": pid,
            "reservationsId": reservationsId,
            "verificationCode": verificationCode,
            "code": code
        },
        success: function (data) {
            if(data=="ss"){
                alert('兑换成功!');
                window.parent.parent.location.href = Feng.ctxPath + '/integralMallWeixin/integralRecord/' + "2";
                parent.layer.close(parent.layer.getFrameIndex(window.name));
            } else {
                alert('兑换未成功!');
                parent.layer.close(parent.layer.getFrameIndex(window.name));
            }
        },
        error: function (data) {
            alert('权限被限制，请联系管理员!');
        }
    });
};